cmake_minimum_required(VERSION 3.10)
project(my)

set(CMAKE_CXX_STANDARD 17)
add_executable(my server.cpp
        net/jtt808_handler.cpp
        codec/data_utils.cpp
        )

set(Boost_USE_STATIC_LIBS ON)
set(MY_ROOT ~/pkg)
set(BOOST_ROOT ~/pkg)
set(CMAKE_CXX_FLAGS "-pthread")
find_package(Boost 1.67.0 REQUIRED
        COMPONENTS system thread context filesystem)

find_path(LIBGLOG_INCLUDE_DIR glog/logging.h)
find_library(LIBGLOG_LIBRARY glog)
find_library(CASS_LIBRARY
        NAMES cassandra
        HINTS "${MY_ROOT}/lib")
find_library(LIBGO_LIBRARY NAMES libgo HINTS "${MY_ROOT}/lib")
include_directories(${Boost_INCLUDE_DIRS} "${MY_ROOT}/include/cassandra")
target_link_libraries(my PUBLIC ${LIBGO_LIBRARY} ${Boost_LIBRARIES} ${CASS_LIBRARY} ${LIBGLOG_LIBRARY})

